library(ggplot2)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
base<-read.csv("../data/UIID_statusdx.csv",header=T)
class(base)
## [1] "data.frame"
base<-base%>%
as_data_frame()%>%
mutate(EstatusDx=as.character(ESTATUDX),
EstatusDx=if_else(ESTATUDX==0,"C. Sin IDP",EstatusDx),
EstatusDx=if_else(ESTATUDX==1,"B. Con IDP",EstatusDx),
EstatusDx=if_else(ESTATUDX==2,"A. IDP en estudio",EstatusDx))
class(base)
## [1] "tbl_df" "tbl" "data.frame"
base
gg01<-ggplot(data=base,aes(x=aniocons, group=EstatusDx, fill=EstatusDx)) +
geom_density(adjust=1.5, position="fill")
# gg01
gg01_pl<-ggplotly(gg01)
## We recommend that you use the dev version of ggplot2 with `ggplotly()`
## Install it with: `devtools::install_github('hadley/ggplot2')`
gg01_pl
El porcentaje de pacientes diagnosticados con IDP se mantiene constate o estable alrededor del 30%.
Se observa que antes (2011) había una mayor proporción de casos en los que se descartaba IDP y, que hoy, parte de esa propoción de casos (~30%), pasó a ser IDP en estudio, mostrando ser hoy más minuciosos para confirmar o descartar el diagnóstico.